<?php if ($_CONTROL->CurrentItemIndex == 0) { ?>
<ul class="thumbnails">
<?php } ?>
<li class="span2">
    <img src="<?php _p($_ITEM->ThumbUrl); ?>" alt="<?php _p($_ITEM->Internal); ?>" />
    <blockquote>
        <p><?php _p($_ITEM->Description); ?></p>
        <small><a href="javascript:void(0);" class="text-error" <?php $_FORM->pxyDelete->RenderAsEvents($_ITEM->Id) ?>>Delete</a></small>
    </blockquote>
</li>
<?php if ($_CONTROL->CurrentItemIndex == count($_CONTROL->DataSource) - 1) { ?>
</ul>
<?php } ?>
